package cc.sunwl.study.springboot2.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.reactive.config.WebFluxConfigurer;

@Configuration
@EnableWebFlux
public class WebFluxConfig implements WebFluxConfigurer {
    /*@Bean
    public CommandLineRunner initData(ArticleRepo articleRepo) {
        return args -> {
            articleRepo.deleteAll().block();
            Article[] restaurants = IntStream.range(0, 3)
                    .mapToObj(String::valueOf)
                    .map(s -> new Article())
                    .toArray(Article[]::new);
            articleRepo.saveAll(Flux.just(restaurants)).subscribe();
        };
    }*/

}
